Loading TOC...

GET /manage/v2/forests/{id|name}/properties

Summary

Retrieve the current state of modifiable properties of the forest identified by {id|name}.

URL Parameters
format The format of the returned data. Can be html, json or xml (default). If present, the format parameter overrides the Accept header.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header. Allowed values: application/xml, application/json, and text/html.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.

Response

Upon success, MarkLogic Server returns status code 200 (OK), and the data in the response body contains the requested information.

Required Privileges

This operation requires the manage-user role, or the following privilege:

http://marklogic.com/xdmp/privileges/manage

Usage Notes

The structure of the output returned from this REST API is as follows:

database

The name of the database to which this forest is attached.

forest-name

The forest name.

enabled

Forest enabled status.

host

The primary host to which the forest is assigned.

data-directory

The optional public directory for forests.

large-data-directory

The optional directory for large objects in a forest.

fast-data-directory

The optional smaller but faster directory for forests.

fast-data-max-size

Maximum allowable size (in megabytes) of the data to be kept by this forest in the fast-data-directory, or 0 for no limit.

updates-allowed

The kinds of updates that should be allowed for this forest.

availability

Availability of the forest data.

rebalancer-enable

Enable automatic rebalancing after configuration changes.

range

Range configuration for the range assignment policy.

This is a complex structure with the following children:

lower-bound

The lower bound of the range on the forest.

upper-bound

The upper bound of the range on the forest.

partition-number

A partition number for query assignment policy

failover-enable

Enable assignment to a failover host if the primary host is down.

failover-hosts

A list of failover hosts for shared-disk failover.

This is a complex structure with the following children:

failover-host

A failover host.

forest-backups

Backups scheduled for this forest.

This is a complex structure with the following children:

forest-backup

A scheduled forest backup.

This is a complex structure with the following children:

backup-id

The backup ID.

backup-enabled

Whether or not a backup is enabled

backup-directory

The backup directory pathname.

backup-type

What type of backup is this.

backup-period

How often this backup should run (every n months, weeks, days, hours or minutes).

backup-month-day

The day of the month that this backup happens.

backup-days

The days that this backup happens.

This is a complex structure with the following children:

backup-day

A day that this backup occurs.

backup-start-date

The starting date (in MM/DD/YYYY notation) for a one-time backup

backup-start-time

The starting time (in 24:00 notation).

backup-timestamp

The date and time this backup was created.

forest-replicas

A list of replica forests, used for local-disk failover (changes will reboot the primary forest).*

This is a complex structure with the following children:

forest-replica

The unique key of a forest.

This is a complex structure with the following children:

host

The primary host to which the forest is assigned.

replica-name

The name of a replica forest

data-directory

The optional public directory for forests.

large-data-directory

The optional directory for large objects in a forest.

fast-data-directory

The optional smaller but faster directory for forests.

database-replication

Database replication configuration.

This is a complex structure with the following children:

foreign-replicas

Foreign replicas of this database.

This is a complex structure with the following children:

foreign-replica

Foreign replica of this database.

This is a complex structure with the following children:

foreign-cluster-name

A foreign cluster ID.

foreign-database-name

A foreign database ID.

foreign-forest-name

A foreign forest ID.

foreign-master

Foreign replica of this database.

This is a complex structure with the following children:

foreign-cluster-name

A foreign cluster ID.

foreign-database-name

A foreign database ID.

foreign-forest-name

A foreign forest ID.

Example


$ curl --anyauth --user user:password -X GET -i \
    -H "Accept: application/xml" \
    http://localhost:8002/manage/v2/forests/example/properties

==> Retrieve the state of the modifiable properties of the forest named 
    "example". MarkLogic Server responds with output similar to the following:

HTTP/1.1 200 OK
Content-type: application/xml
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 436
Connection: Keep-Alive
Keep-Alive: timeout=5

<forest-properties 
    xsi:schemaLocation="http://marklogic.com/manage manage.xsd" 
    xmlns="http://marklogic.com/manage" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <enabled>true</enabled>
  <updates-allowed>all</updates-allowed>
  <availability>online</availability>
  <rebalancer-enable>true</rebalancer-enable>
  <range/>
  <failover-enable>true</failover-enable>
  <failover-hosts/>
  <forest-replicas/>
</forest-properties>

The corresponding JSON output is similar to the following:
{
  "enabled": true,
  "updates-allowed": "all",
  "availability": "online",
  "rebalancer-enable": true,
  "range": null,
  "failover-enable": true,
  "failover-host": null,
  "forest-replica": null
}
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.